<template>
  <div class="header">
    <div class="header-left"><div class="iconfont icon-back">&#xe75a;</div></div>
    <div class="header-input"><span class="iconfont icon-search">&#xeb86;</span><span>输入城市/景点/游玩主题</span></div>
    <router-link to="/city">
      <div class="header-right">{{ city }}<span class="iconfont icon-down">&#xe63f;</span></div>
    </router-link>
  </div>
</template>
<script>
import { mapState } from 'vuex'
export default {
  name: 'HomeHeader',
  computed: {
    ...mapState(['city'])
  }
}
</script>

<style lang="less" scoped>
@import '~styles/varibles.less';
.header {
  display: flex;
  line-height: 0.86rem;
  background: @bgColor;
  color: #fff;
  .header-left {
    width: 0.64rem;
    .icon-back {
      font-size: 0.5rem;
      text-align: center;
    }
  }
  .header-input {
    flex: 1;
    height: 0.63rem;
    padding-left: 0.4rem;
    line-height: 0.63rem;
    margin-top: 0.12rem;
    margin-left: 0.2rem;
    background: #fff;
    border-radius: 0.1rem;
    color: #ccc;
    .icon-search {
      font-size: 0.4rem;
      vertical-align: middle;
    }
  }
  .header-right {
    min-width: 1.04rem;
    padding: 0 0.1rem;
    color: #fff;
    text-align: center;
    .icon-down {
      font-size: 0.25rem;
    }
  }
}
</style>
